3.4.42 \(\int \frac {\log (1-\frac {c (a-b x)}{a+b x})}{(a-b x) (a+b x)} \, dx\) [342]

Optimal. Leaf size=27 \[ \frac {\text {Li}_2\left (\frac {c (a-b x)}{a+b x}\right )}{2 a b} \]

[Out]

1/2*polylog(2,c*(-b*x+a)/(b*x+a))/a/b

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {2597, 2565, 2352} \begin {gather*} \frac {\text {PolyLog}\left (2,\frac {c (a-b x)}{a+b x}\right )}{2 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[1 - (c*(a - b*x))/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

PolyLog[2, (c*(a - b*x))/(a + b*x)]/(2*a*b)

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2565

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(q + 1)*(i/d)^q, Subst[Int[(b*f - a*g - (d*f - c
*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e
, f, g, h, i, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m, q] && IGtQ[p, 0] && EqQ[d*h - c*i, 0]

Rule 2597

Int[Log[(e_.)*((f_.)*((g_) + (v_.)/(w_)))^(r_.)]^(s_.)*(u_.), x_Symbol] :> Int[u*Log[e*(f*(ExpandToSum[v + g*w
, x]/ExpandToSum[w, x]))^r]^s, x] /; FreeQ[{e, f, g, r, s}, x] && LinearQ[w, x] && (FreeQ[v, x] || LinearQ[v,
x]) && AlgebraicFunctionQ[u, x]

Rubi steps

\begin {align*} \int \frac {\log \left (1-\frac {c (a-b x)}{a+b x}\right )}{(a-b x) (a+b x)} \, dx &=\int \frac {\log \left (\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{(a-b x) (a+b x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {\log (x)}{1-x} \, dx,x,\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{2 a b}\\ &=\frac {\text {Li}_2\left (\frac {c (a-b x)}{a+b x}\right )}{2 a b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(259\) vs. \(2(27)=54\).
time = 0.06, size = 259, normalized size = 9.59 \begin {gather*} \frac {4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a}{b}+x\right )-\log ^2\left (\frac {a}{b}+x\right )-4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a-a c}{b+b c}+x\right )+2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {a-b x}{2 a}\right )-2 \log \left (\frac {a-a c}{b+b c}+x\right ) \log \left (\frac {(1+c) (a-b x)}{2 a}\right )+2 \log \left (\frac {a-a c}{b+b c}+x\right ) \log \left (\frac {(1+c) (a+b x)}{2 a c}\right )+4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a-a c+b (1+c) x}{a+b x}\right )+2 \text {Li}_2\left (\frac {a+b x}{2 a}\right )-2 \text {Li}_2\left (\frac {a-a c+b (1+c) x}{2 a}\right )+2 \text {Li}_2\left (-\frac {a-a c+b (1+c) x}{2 a c}\right )}{4 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[1 - (c*(a - b*x))/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

(4*ArcTanh[(b*x)/a]*Log[a/b + x] - Log[a/b + x]^2 - 4*ArcTanh[(b*x)/a]*Log[(a - a*c)/(b + b*c) + x] + 2*Log[a/
b + x]*Log[(a - b*x)/(2*a)] - 2*Log[(a - a*c)/(b + b*c) + x]*Log[((1 + c)*(a - b*x))/(2*a)] + 2*Log[(a - a*c)/
(b + b*c) + x]*Log[((1 + c)*(a + b*x))/(2*a*c)] + 4*ArcTanh[(b*x)/a]*Log[(a - a*c + b*(1 + c)*x)/(a + b*x)] +
2*PolyLog[2, (a + b*x)/(2*a)] - 2*PolyLog[2, (a - a*c + b*(1 + c)*x)/(2*a)] + 2*PolyLog[2, -1/2*(a - a*c + b*(
1 + c)*x)/(a*c)])/(4*a*b)

________________________________________________________________________________________

Maple [A]
time = 0.80, size = 24, normalized size = 0.89

method result size
derivativedivides \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
default \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
risch \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(1-c*(-b*x+a)/(b*x+a))/(-b*x+a)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/2/b/a*dilog(1+c-2*c*a/(b*x+a))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 243 vs. \(2 (26) = 52\).
time = 0.30, size = 243, normalized size = 9.00 \begin {gather*} \frac {1}{2} \, {\left (\frac {\log \left (b x + a\right )}{a b} - \frac {\log \left (b x - a\right )}{a b}\right )} \log \left (\frac {{\left (b x - a\right )} c}{b x + a} + 1\right ) + \frac {\log \left (b x + a\right )^{2} - 2 \, \log \left (b x + a\right ) \log \left (b x - a\right )}{4 \, a b} + \frac {\log \left (b x - a\right ) \log \left (\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a} + 1\right ) + {\rm Li}_2\left (-\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a}\right )}{2 \, a b} + \frac {\log \left (b x + a\right ) \log \left (-\frac {b x + a}{2 \, a} + 1\right ) + {\rm Li}_2\left (\frac {b x + a}{2 \, a}\right )}{2 \, a b} - \frac {\log \left (b x + a\right ) \log \left (-\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c} + 1\right ) + {\rm Li}_2\left (\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c}\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1-c*(-b*x+a)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*(log(b*x + a)/(a*b) - log(b*x - a)/(a*b))*log((b*x - a)*c/(b*x + a) + 1) + 1/4*(log(b*x + a)^2 - 2*log(b*x
 + a)*log(b*x - a))/(a*b) + 1/2*(log(b*x - a)*log(1/2*(b*(c + 1)*x - a*(c + 1))/a + 1) + dilog(-1/2*(b*(c + 1)
*x - a*(c + 1))/a))/(a*b) + 1/2*(log(b*x + a)*log(-1/2*(b*x + a)/a + 1) + dilog(1/2*(b*x + a)/a))/(a*b) - 1/2*
(log(b*x + a)*log(-1/2*(b*(c + 1)*x + a*(c + 1))/(a*c) + 1) + dilog(1/2*(b*(c + 1)*x + a*(c + 1))/(a*c)))/(a*b
)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 34, normalized size = 1.26 \begin {gather*} \frac {{\rm Li}_2\left (\frac {a c - {\left (b c + b\right )} x - a}{b x + a} + 1\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1-c*(-b*x+a)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*dilog((a*c - (b*c + b)*x - a)/(b*x + a) + 1)/(a*b)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(1-c*(-b*x+a)/(b*x+a))/(-b*x+a)/(b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1-c*(-b*x+a)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="giac")

[Out]

integrate(-log((b*x - a)*c/(b*x + a) + 1)/((b*x + a)*(b*x - a)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {\ln \left (1-\frac {c\,\left (a-b\,x\right )}{a+b\,x}\right )}{\left (a+b\,x\right )\,\left (a-b\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(1 - (c*(a - b*x))/(a + b*x))/((a + b*x)*(a - b*x)),x)

[Out]

int(log(1 - (c*(a - b*x))/(a + b*x))/((a + b*x)*(a - b*x)), x)

________________________________________________________________________________________